var headerMap = {};

$(function () {
    const loginAuth = $.cookie('loginAuth');
    if (typeof loginAuth === 'undefined' || loginAuth === '') {
        window.location = '/login-2.html';
        return;
    }

    headerMap["Content-Type"] = 'application/json';
    headerMap["token"] = loginAuth;
});

/**显示权限按钮*/
function setAuthority() {
    var menuCode = getQueryString("menuCode");
    lay_msg(menuCode);
    var paramData = "menuCode="+menuCode;
    var jsonAuthAjax = JSONAuthAjax(dl_coder_url.child_authority[0],dl_coder_url.child_authority[1],paramData);
    if(jsonAuthAjax.code === '200' && jsonAuthAjax.data.length>0){
        for(var i=0;i<jsonAuthAjax.data.length;i++){
            $("a[lay-event$='"+jsonAuthAjax.data[i]+"']").show();
            $("#"+jsonAuthAjax.data[i]).show();
        }
    }
}



